3.115 \(\int x^2 \sqrt{\log (a x^n)} \, dx\)

Optimal. Leaf size=72 \[ \frac{1}{3} x^3 \sqrt{\log \left (a x^n\right )}-\frac{1}{6} \sqrt{\frac{\pi }{3}} \sqrt{n} x^3 \left (a x^n\right )^{-3/n} \text{Erfi}\left (\frac{\sqrt{3} \sqrt{\log \left (a x^n\right )}}{\sqrt{n}}\right ) \]

[Out]

-(Sqrt[n]*Sqrt[Pi/3]*x^3*Erfi[(Sqrt[3]*Sqrt[Log[a*x^n]])/Sqrt[n]])/(6*(a*x^n)^(3/n)) + (x^3*Sqrt[Log[a*x^n]])/
3

________________________________________________________________________________________

Rubi [A]  time = 0.0649955, antiderivative size = 72, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {2305, 2310, 2180, 2204} \[ \frac{1}{3} x^3 \sqrt{\log \left (a x^n\right )}-\frac{1}{6} \sqrt{\frac{\pi }{3}} \sqrt{n} x^3 \left (a x^n\right )^{-3/n} \text{Erfi}\left (\frac{\sqrt{3} \sqrt{\log \left (a x^n\right )}}{\sqrt{n}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[x^2*Sqrt[Log[a*x^n]],x]

[Out]

-(Sqrt[n]*Sqrt[Pi/3]*x^3*Erfi[(Sqrt[3]*Sqrt[Log[a*x^n]])/Sqrt[n]])/(6*(a*x^n)^(3/n)) + (x^3*Sqrt[Log[a*x^n]])/
3

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2310

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)*x)/n)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2180

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/Sqrt[(c_.) + (d_.)*(x_)], x_Symbol] :> Dist[2/d, Subst[Int[F^(g*(e - (c*
f)/d) + (f*g*x^2)/d), x], x, Sqrt[c + d*x]], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rubi steps

\begin{align*} \int x^2 \sqrt{\log \left (a x^n\right )} \, dx &=\frac{1}{3} x^3 \sqrt{\log \left (a x^n\right )}-\frac{1}{6} n \int \frac{x^2}{\sqrt{\log \left (a x^n\right )}} \, dx\\ &=\frac{1}{3} x^3 \sqrt{\log \left (a x^n\right )}-\frac{1}{6} \left (x^3 \left (a x^n\right )^{-3/n}\right ) \operatorname{Subst}\left (\int \frac{e^{\frac{3 x}{n}}}{\sqrt{x}} \, dx,x,\log \left (a x^n\right )\right )\\ &=\frac{1}{3} x^3 \sqrt{\log \left (a x^n\right )}-\frac{1}{3} \left (x^3 \left (a x^n\right )^{-3/n}\right ) \operatorname{Subst}\left (\int e^{\frac{3 x^2}{n}} \, dx,x,\sqrt{\log \left (a x^n\right )}\right )\\ &=-\frac{1}{6} \sqrt{n} \sqrt{\frac{\pi }{3}} x^3 \left (a x^n\right )^{-3/n} \text{erfi}\left (\frac{\sqrt{3} \sqrt{\log \left (a x^n\right )}}{\sqrt{n}}\right )+\frac{1}{3} x^3 \sqrt{\log \left (a x^n\right )}\\ \end{align*}

Mathematica [A]  time = 0.0326051, size = 67, normalized size = 0.93 \[ \frac{1}{18} x^3 \left (6 \sqrt{\log \left (a x^n\right )}-\sqrt{3 \pi } \sqrt{n} \left (a x^n\right )^{-3/n} \text{Erfi}\left (\frac{\sqrt{3} \sqrt{\log \left (a x^n\right )}}{\sqrt{n}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Sqrt[Log[a*x^n]],x]

[Out]

(x^3*(-((Sqrt[n]*Sqrt[3*Pi]*Erfi[(Sqrt[3]*Sqrt[Log[a*x^n]])/Sqrt[n]])/(a*x^n)^(3/n)) + 6*Sqrt[Log[a*x^n]]))/18

________________________________________________________________________________________

Maple [F]  time = 0.174, size = 0, normalized size = 0. \begin{align*} \int{x}^{2}\sqrt{\ln \left ( a{x}^{n} \right ) }\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*ln(a*x^n)^(1/2),x)

[Out]

int(x^2*ln(a*x^n)^(1/2),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sqrt{\log \left (a x^{n}\right )}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(a*x^n)^(1/2),x, algorithm="maxima")

[Out]

integrate(x^2*sqrt(log(a*x^n)), x)

________________________________________________________________________________________

Fricas [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(a*x^n)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: UnboundLocalError

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sqrt{\log{\left (a x^{n} \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*ln(a*x**n)**(1/2),x)

[Out]

Integral(x**2*sqrt(log(a*x**n)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sqrt{\log \left (a x^{n}\right )}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*log(a*x^n)^(1/2),x, algorithm="giac")

[Out]

integrate(x^2*sqrt(log(a*x^n)), x)